<template>
  <div class="AddOrUpdate_main add_container column_three">
    <div id="chat" class="main_main">
      <el-form ref="form" :model="formData" :rules="rules" :inline="true">
        <el-form-item label="外协订单号" prop="code">
          <CodeRuleInput :band-value.sync="formData.code" table-name="outsource_order" column-name="code" :is-edit="id" />
        </el-form-item>
        <el-form-item label="制单人员" prop="orderBy">
          <el-input v-model="formData.orderName" placeholder="暂无" disabled />
        </el-form-item>
        <el-form-item label="制单日期" prop="orderTime">
          <el-date-picker
            v-model="formData.orderTime"
            value-format="yyyy-MM-dd"
            placeholder="请选择"
          />
        </el-form-item>
        <!-- <el-form-item label="外协类型" prop="supplierTypeCode">
          <DictSelect :band-value.sync="formData.supplierTypeCode" dict-type="outsourceSupplierType" />
        </el-form-item> -->
        <el-form-item label="计划单号" prop="productionPlanCode">
          <el-input v-model="formData.productionPlanCode" placeholder="暂无" disabled />
        </el-form-item>
        <el-form-item label="外协供应商" class="clickChoose" prop="supplierName">
          <el-input v-model="formData.supplierName" placeholder="请选择" readonly />
          <a
            class="clickChoose_button"
            @click.prevent="choosePeople"
          >
            <svg-icon icon-class="选择弹框" />
          </a>
        </el-form-item>
        <el-form-item label="外协总数量" prop="totalNumber">
          <el-input v-model="formData.totalNumber" placeholder="暂无" disabled />
        </el-form-item>
        <el-form-item label="含税总金额" prop="taxTotalMoney">
          <el-input v-model="formData.taxTotalMoney" placeholder="暂无" disabled />
        </el-form-item>
        <el-form-item label="附件" class="double">
          <FileManageFull
            :file-names="formData.fileName"
            :file-real-names="formData.fileRealName"
            :file-urls="formData.url"
            :row-index="1"
            @fileName="setFileName"
          />
        </el-form-item>
        <el-form-item label="备注" class="double">
          <el-input
            v-model="formData.remark"
            maxlength="200"
            show-word-limit
            type="textarea"
            placeholder="请输入"
          />
        </el-form-item>
      </el-form>
      <div v-if="formData.automaticCreate==0" class="formItem_header">
        <!-- 订单明细 -->
        <div />
        <div class="formItem_header_operate">
          <a class="formItem_header_operate_item" @click="add">
            <svg-icon icon-class="新增" />
            <div class="item_name">添加</div>
          </a>
          <a class="formItem_header_operate_item delete" @click="remove1">
            <svg-icon icon-class="删除" />
            <div class="item_name">删除</div>
          </a>
        </div>
      </div>
      <div ref="table_container" class="table_container">
        <el-table
          id="ddd"
          ref="table"
          :data="listData"
          :height="tableHeight"
          stripe
          border
          style="width: 99.9%"
          :summary-method="getSummaries"
          :show-summary="showSummary"
          :header-cell-class-name="headerCellClassName"
          @selection-change="selectionChange1"
        >
          <el-table-column v-if="formData.automaticCreate==0" type="selection" align="center" width="70" />
          <el-table-column label="工艺要求" fixed="right" width="150" prop="engineeringRequirementCode">
            <template slot-scope="scope">
              <span v-if="formData.automaticCreate==1">{{ scope.row.engineeringRequirementVersionCode }}</span>
              <el-input v-else v-model="scope.row.engineeringRequirementCode" placeholder="请选择" readonly @click.native="chooseEngineeringRequirementCode(scope.row,scope.$index)" />
            </template>
          </el-table-column>
          <!-- <el-table-column label="工艺要求" fixed="right" width="150" prop="engineeringRequirementCode">
            <template slot-scope="scope">
            </template>
          </el-table-column> -->
          <el-table-column label="工序" fixed="right" width="100">
            <template slot-scope="scope">
              <!-- <el-select v-if="!formData.productionPlanCode" v-model="scope.row.processId" placeholder="请选择" @change="changeProcess(scope.row,scope.$index)">
                <el-option
                  v-for="item in workProcedureList"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                />
              </el-select> -->
              <span>{{ scope.row.engineeringProcessName }}</span>
            </template>
          </el-table-column>
          <el-table-column label="外协数量" fixed="right" :min-width="SETTINGS.settings_decimalDigits_length" prop="outsourceNumber">
            <template slot-scope="scope">
              <span v-if="formData.automaticCreate==1">{{ scope.row.outsourceNumber }}</span>
              <el-input v-else v-model="scope.row.outsourceNumber" placeholder="请输入" clearable @input="changeOutsourceNumber($event,scope.row,scope.$index)" @clear="changeOutsourceNumber($event,scope.row,scope.$index)" />
            </template>
          </el-table-column>
          <el-table-column label="物料编码" min-width="120" :show-overflow-tooltip="true">
            <template slot-scope="scope">
              <span>{{ scope.row.materialCode }}</span>
            </template>
          </el-table-column>
          <el-table-column label="物料名称" min-width="100" :show-overflow-tooltip="true">
            <template slot-scope="scope">
              <span>{{ scope.row.materialName }}</span>
            </template>
          </el-table-column>
          <el-table-column label="规格型号" min-width="100" :show-overflow-tooltip="true">
            <template slot-scope="scope">
              <span>{{ scope.row.materialModel }}</span>
            </template>
          </el-table-column>
          <el-table-column label="物料单位" min-width="100" :show-overflow-tooltip="true">
            <template slot-scope="scope">
              <span>{{ scope.row.materialUnitName }}</span>
            </template>
          </el-table-column>
          <el-table-column label="需求数量" min-width="100" prop="needNumber">
            <template slot-scope="scope">
              <span>{{ scope.row.needNumber }}</span>
            </template>
          </el-table-column>
          <el-table-column label="含税单价" :min-width="SETTINGS.settings_decimalDigits_length">
            <template slot-scope="scope">
              <el-input v-model="scope.row.taxPrice" placeholder="请输入" clearable @input="changeTaxPrice($event,scope.row,scope.$index)" />
            </template>
          </el-table-column>
          <el-table-column label="税率%" min-width="100" prop="taxRateCode">
            <template slot-scope="scope">
              <el-select
                v-model="scope.row.taxRateCode"
                clearable
                filterable
                placeholder="请选择"
              >
                <el-option
                  v-for="item in taxRateCodeList"
                  :key="item.dictCode"
                  :label="item.dictLabel"
                  :value="item.dictCode"
                />
              </el-select>
            </template></el-table-column>
          <el-table-column label="含税总金额" :min-width="SETTINGS.settings_decimalDigits_length" prop="totalTaxPrice">
            <template slot-scope="scope">
              <span>{{ Number(scope.row.totalTaxPrice)||'0' }}</span>
            </template>
          </el-table-column>
          <el-table-column label="外协交期" width="140">
            <template slot-scope="scope">
              <el-date-picker
                v-model="scope.row.outsourceDeliveryTime"
                type="date"
                placeholder="请选择"
              />
            </template>
          </el-table-column>
          <el-table-column label="备注" width="200">
            <template slot-scope="scope">
              <el-input v-model="scope.row.remark" placeholder="请输入" clearable />
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="main_bottom">
      <el-button type="cancel" @click.stop="cancel">取消</el-button>
      <el-button @click.stop="onSubmit('0')">保存</el-button>
      <el-button @click.stop="onSubmit('1')">提交</el-button>
    </div>
  </div>
</template>

<script>
import { addOrUpdate, getInfo, getInfoBySupplierIdAndProcessId } from '@/api/outsourceManage/outsourceOrder'
import { list as workProcedure } from '@/api/engineeringManage/processManage'
import addOrderForm from './addOrderForm'
import addMaterial from './addMaterial'
import supplier from './supplier'
import chooseEngineeringRequirement from './chooseEngineeringRequirement.vue'
import moment from 'moment'
import { getDictSelects } from '@/api/common/common'
import Big from 'big.js' // big.js解决精度丢失问题
export default {
  name: 'AddOrUpdate',
  props: {
    layerid: {},
    id: {},
    defaultValue: {},
    resData: { }
  },
  data() {
    return {
      formData: {
        id: undefined,
        code: undefined,
        orderBy: undefined,
        orderName: undefined,
        orderTime: undefined,
        productionPlanCode: undefined,
        productionPlanId: undefined,
        // supplierTypeCode: undefined,
        supplierName: null,
        outsourceSupplierInformationId: undefined,
        fileName: '',
        fileRealName: '',
        url: '',
        remark: undefined,
        totalNumber: '',
        taxTotalMoney: '',
        status: 1,
        automaticCreate: '0',
        detailList: []
      },
      foDate: {
        companyId: undefined,
        status: 1
      },
      saveData: [],
      showSummary: true,
      detailedData: [],
      requisitionDataOne: [],
      tableHeight: '',
      userOptions: [],
      equipmentList: [],
      selectionsAll1: [],
      taxRateCodeList: [],
      ids: [],
      roleOptions: [],
      selectionsAll: [], // 表格所有页选中的行
      inx: 1,
      tableDate: [],
      listData: [],
      rules: {
        code: [
          { required: true, message: '外协订单不能为空', trigger: 'blur' }
        ],
        supplierName: [
          { required: true, message: '外协供应商不能为空', trigger: 'change' }
        ]
        // supplierTypeCode: [
        //   { required: true, message: '外协类型不能为空', trigger: 'change' }
        // ]
      },
      orderDate: {
        supplierId: '',
        materialIds: []
      },
      materialIdsOne: '',
      workProcedureList: []
    }
  },
  watch: {
    listData() {
      if (this.listData.length > 7) {
        this.tableHeight = '390'
      } else {
        this.tableHeight = ''
      }
      console.log(this.listData)
      this.$refs['table'].doLayout()
    }
  },
  created() {
    if (!this.id) { // 没有id就是新增
    } else { // 有id就是编辑
      this.getInfo()
    }
  },
  updated() {
    console.log('我更新了')
    this.$nextTick(() => {
      this.$refs['table'].doLayout()
    })
  },
  mounted() {
    console.log(this.resData)
    if (this.resData) {
      this.resData.map((item) => {
        item.processId = item.engineeringProcessId
      })
      this.listData = this.resData

      this.formData.productionPlanCode = this.$store.state.order.productCode
      this.formData.productionPlanId = this.$store.state.order.requestId
    }

    this.formData.orderName = this.$store.state.user.name
    this.formData.orderBy = this.$store.state.user.userId
    this.formData.orderTime = moment(new Date()).format('YYYY-MM-DD')
    this.getDictOptions()
    this.workProcedure()
    // this.$nextTick(() => {
    //   this.tableHeight = this.$refs.table_container.offsetHeight
    // })
  },
  destroyed() {
    this.$store.state.order.outsourceManageData = []
    this.$store.state.order.isOutsourceManage = false
    this.$store.state.order.requestId = ''
    this.$store.state.order.productCode = ''
  },
  methods: {
    chooseEngineeringRequirementCallBack(data) {
      this.$set(this.listData[this.currentIndex], 'engineeringRequirementMaterialId', data.id)
      this.$set(this.listData[this.currentIndex], 'engineeringRequirementCode', data.engineeringRequirementCode)
      this.$set(this.listData[this.currentIndex], 'engineeringProcessName', data.engineeringProcessName)
      this.$set(this.listData[this.currentIndex], 'engineeringProcessId', data.engineeringProcessId)
      this.listData[this.currentIndex].outsourceDeliveryTime = this.listData[this.currentIndex].outsourceDeliveryTime ? this.listData[this.currentIndex].outsourceDeliveryTime : this.$set(this.listData[this.currentIndex], 'outsourceDeliveryTime', '')
      if (this.formData.outsourceSupplierInformationId) {
        getInfoBySupplierIdAndProcessId({
          supplierId: this.formData.outsourceSupplierInformationId.toString(),
          processId: this.listData[this.currentIndex].engineeringProcessId.toString(),
          materialId: this.listData[this.currentIndex].materialId.toString()
        }).then(res => {
          if (res.data.length > 0) {
            this.$set(this.listData[this.currentIndex], 'taxPrice', res.data[0].data[0].taxPrice)
            this.$set(this.listData[this.currentIndex], 'taxRateCode', res.data[0].data[0].taxRateCode)
          }
        })
      }
      // this.tableDate[this.currentIndex]['engineeringRequirementMaterialId'] = data.id
      // this.tableDate[this.currentIndex]['engineeringRequirementCode'] = data.engineeringRequirementCode
      // this.tableDate[this.currentIndex]['engineeringProcessName'] = data.engineeringProcessName
      // this.tableDate[this.currentIndex]['engineeringProcessId'] = data.engineeringProcessId
    },
    chooseEngineeringRequirementCode(row, index) {
      this.currentIndex = index
      this.$layer.iframe({
        // 弹框
        content: {
          content: chooseEngineeringRequirement, // 传递的组件对象
          parent: this, // 当前的vue对象
          data: {
            id: row.engineeringRequirementMaterialId,
            materialId: row.materialId
          } // props
        },
        area: ['1320px', '700px'],
        title: '选择工艺要求', // 标题
        shadeClose: false // 点击遮罩是否关闭
      })
    },
    setFileName(...data) {
      this.$set(this.formData, 'fileName', data[0])
      this.$set(this.formData, 'fileRealName', data[1])
      this.$set(this.formData, 'url', data[2])
    },
    headerCellClassName(data) {
      if (['outsourceNumber', 'engineeringRequirementCode'].indexOf(data.column.property) != -1) {
        return 'column_bt'
      }
    },
    showMaterialOne(data) {
      this.listData = data
    },
    changeOutsourceNumber(e, row, index) { // 外协数量
      if (e && this.listData[index].taxPrice) {
        const data = new Big(this.listData[index].taxPrice).times(e).toString()
        this.listData[index].totalTaxPrice = data
        this.$set(this.listData[index], 'totalTaxPrice', data || '0')
      } else {
        this.$set(this.listData[index], 'totalTaxPrice', '0')
      }
      const scrollLeft = JSON.parse(JSON.stringify(this.$refs.table.bodyWrapper.scrollLeft))// 保存当前横向滚动条位置
      this.showSummary = false
      this.$nextTick(() => {
        this.showSummary = true
        this.$refs.table.bodyWrapper.scrollLeft = 0
        this.$nextTick(() => {
          this.$refs.table.bodyWrapper.scrollLeft = scrollLeft
        })
      })
    },
    changeTaxPrice(e, row, index) { // 含税单价
      console.log(e)
      if (e && this.listData[index].outsourceNumber) {
        const data = new Big(this.listData[index].outsourceNumber).times(e).toString()
        this.listData[index].totalTaxPrice = data
        this.$set(this.listData[index], 'totalTaxPrice', data || '0')
      } else {
        // this.listData[index].totalTaxPrice = '0'
        this.$set(this.listData[index], 'totalTaxPrice', '0')
      }
      // const data = new Big(this.listData[index].taxPrice).times(this.listData[index].outsourceNumber).toString()
      // this.listData[index].totalTaxPrice = e && this.listData[index].outsourceNumber ? data : '0'
      // this.$set(this.listData[index], 'totalTaxPrice', data || '0')
      const scrollLeft = JSON.parse(JSON.stringify(this.$refs.table.bodyWrapper.scrollLeft))// 保存当前横向滚动条位置
      this.showSummary = false
      this.$nextTick(() => {
        this.showSummary = true
        this.$refs.table.bodyWrapper.scrollLeft = 0
        this.$nextTick(() => {
          this.$refs.table.bodyWrapper.scrollLeft = scrollLeft
        })
      })
    },
    // changeProcess(row, index) {
    //   const arr = this.$deepClone(this.listData)
    //   arr.splice(this.listData.indexOf(row), 1)
    //   const arr2 = arr.filter(item => item.materialId == row.materialId)
    //   if (arr2.filter(item => item.processId == row.processId).length > 0) {
    //     this.listData[index].processId = ''
    //     this.$message.warning('该物料下的该工序已存在,请重新选择工序')
    //   }
    //   const arrData = []
    //   arrData.push(row.processId)
    //   getInfoBySupplierIdAndProcessId({ supplierId: this.formData.outsourceSupplierInformationId.toString(), processId: arrData.toString(), materialId: JSON.stringify(row.materialId) }).then(res => {
    //     const arrs = res.data.map(item => {
    //       return { materialId: item.materialListVo.id, ...item.data[0] }
    //     })
    //     const arr2 = this.$deepClone(this.listData)
    //     arr2.forEach((ele, index) => {
    //       const data = arrs.find(item => {
    //         return item.materialId == ele.materialId && ele.processId == item.engineeringProcessId
    //       })
    //       if (data) {
    //         ele.processId = data.engineeringProcessId
    //         ele.taxPrice = data.taxPrice
    //         ele.taxRateCode = data.taxRateCode
    //       }
    //       ele.totalTaxPrice = ele.outsourceNumber && ele.taxPrice ? new Big(ele.outsourceNumber).times(ele.taxPrice).toString() : '0'
    //     })
    //     this.listData = arr2
    //   })
    // },
    workProcedure() {
      workProcedure({ status: '1' }).then(res => {
        this.workProcedureList = res.data
      })
    },
    getDictOptions() {
      getDictSelects('taxRateCode').then(res => {
        this.taxRateCodeList = res.data
      })
    },
    changeTaxRateCode(e, row, index) {
      this.taxRateCodeList.forEach(ele => {
        if (ele.dictCode == e) {
          this.listData[index].taxRateLabel = ele.dictLabel
        }
      })
      // if (row.price) {
      //   this.listData[index].taxPrice = (Number(this.listData[index].price) * (1 + Number(this.listData[index].taxRateLabel) / 100)).toFixed(2)
      // }
      if (row.taxRateCode == '' || row.taxRateCode == null) {
        this.listData[index].taxPrice = '0.00'
        this.listData[index].totalTaxPrice = '0.00'
        this.listData[index].taxRateCode = ''
        this.listData[index].taxRateLabel = ''
      }
      const scrollLeft = this.$refs.table.bodyWrapper.scrollLeft // 保存当前横向滚动条位置
      this.showSummary = false
      this.$nextTick(() => {
        this.showSummary = true
        this.$refs.table.bodyWrapper.scrollLeft = 0
        this.$nextTick(() => {
          this.$refs.table.bodyWrapper.scrollLeft = scrollLeft
        })
      })
    },
    selectionChange1(rows) {
      this.selectionsAll1 = rows
    },
    chooseSupplier(data) {
      this.formData.supplierName = data.name
      this.formData.outsourceSupplierInformationId = data.id
      const arr = []
      this.listData.forEach(ele => {
        this.$set(ele, 'outsourceDeliveryTime', '')
        if (ele.engineeringProcessId) {
          arr.push(ele.engineeringProcessId)
        }
      })
      if (arr.length > 0) {
        getInfoBySupplierIdAndProcessId({ supplierId: data.id.toString(), processId: arr.toString(), materialId: this.listData.map(item => item.materialId).toString() }).then(res => {
          const arrs = res.data.map(item => {
            return { materialId: item.materialListVo.id, ...item.data[0] }
          })
          const arr2 = this.$deepClone(this.listData)
          arr2.forEach((ele, index) => {
            const data2 = arrs.find(item => {
              return item.materialId == ele.materialId && ele.engineeringProcessId == item.engineeringProcessId
            })
            if (data2) {
              ele.engineeringProcessId = data2.engineeringProcessId
              ele.taxPrice = data2.taxPrice
              ele.taxRateCode = data2.taxRateCode
              // ele.totalTaxPrice = ele.outsourceNumber && ele.taxPrice ? new Big(ele.outsourceNumber).times(ele.taxPrice).toString() : '0'
            } else {
              ele.taxPrice = ''
              ele.taxRateCode = ''
            }
            ele.totalTaxPrice = ele.outsourceNumber && ele.taxPrice ? new Big(ele.outsourceNumber).times(ele.taxPrice).toString() : '0'
          })
          this.listData = arr2
        })
      }
    },
    // 合计行
    getSummaries(param) {
      const {
        columns,
        data
      } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index == 0) {
          sums[index] = '合计'
          return
        }
        switch (column.property) {
          case 'needNumber':
            sums[index] = data.map(item => item.needNumber).reduce((prev, curr) => {
              if (curr) {
                return new Big(prev).plus(curr).toString()
              } else {
                return new Big(prev).toString()
              }
            }, 0)
            break
        }
        switch (column.property) {
          case 'outsourceNumber':
            sums[index] = data.map(item => item.outsourceNumber).reduce((prev, curr) => {
              if (curr) {
                return new Big(prev).plus(curr).toString()
              } else {
                return new Big(prev).toString()
              }
            }, 0)
            this.formData.totalNumber = sums[index]
            break
        }
        switch (column.property) {
          case 'totalTaxPrice':
            sums[index] = data.map(item => item.totalTaxPrice).reduce((prev, curr) => {
              if (curr) {
                return new Big(prev).plus(curr).toString()
              } else {
                return new Big(prev).toString()
              }
            }, 0)
            this.formData.taxTotalMoney = sums[index]
            break
        }
      })
      return sums
    },
    getInfo() {
      getInfo(this.id).then(res => {
        this.formData = res.data
        this.listData = res.data.detailList
        this.saveData = this.$deepClone(this.listData)
        this.listData.forEach(item => {
          item.taxRateLabel = item.taxRateCode
        })
      })
    },
    remove1() {
      this.selectionsAll1.forEach(item => {
        this.listData.splice(this.listData.indexOf(item), 1)
      })
    },
    add() {
      if (this.formData.productionPlanCode) {
        this.$store.state.order.requestId = this.formData.productionPlanId
        this.$layer.iframe({
          // 弹框
          content: {
            content: addMaterial, // 传递的组件对象
            parent: this, // 当前的vue对象
            data: {
              selectedRow: this.listData ? this.listData : []
            } // props
          },
          area: ['1320px', '700px'],
          title: '选择外协订单明细', // 标题
          shadeClose: false // 点击遮罩是否关闭
        })
      } else {
        this.$layer.iframe({
          // 弹框
          content: {
            content: addOrderForm, // 传递的组件对象
            parent: this, // 当前的vue对象
            data: {
              selectedRow: this.listData ? this.listData : []
            } // props
          },
          area: ['1320px', '700px'],
          title: '选择外协订单明细', // 标题
          shadeClose: false // 点击遮罩是否关闭
        })
      }
      // if (this.formData.supplierName) {
      //
      // } else {
      //   this.$message.warning('请选择供应商')
      //   return
      // }
    },
    // 选择供应商
    choosePeople() {
      this.$layer.iframe({
        // 弹框
        content: {
          content: supplier, // 传递的组件对象
          parent: this, // 当前的vue对象
          data: {
            selectedRow: this.listData,
            id: this.formData.outsourceSupplierInformationId ? this.formData.outsourceSupplierInformationId : ''
          } // props
        },
        area: ['880px', '700px'],
        title: '选择供应商', // 标题
        shadeClose: false // 点击遮罩是否关闭
      })
    },
    onSubmit(num) {
      this.$refs['form'].validate(valid => {
        if (valid) {
          this.formData.status = num
          if (this.listData.length == 0) {
            this.$message.warning('请添加外协订单明细')
            return
          }
          if (this.listData.filter(item => !item.engineeringProcessId).length > 0) {
            this.$message.warning('工序不能为空')
            return
          }
          if (this.listData.filter(item => !item.outsourceNumber).length > 0) {
            this.$message.warning('外协数量不能为空')
            return
          } else if (this.listData.filter(item => item.outsourceNumber && !this.SETTINGS.reg_no_zero.test(item.outsourceNumber)).length > 0) {
            this.$message.warning('外协数量未正确填写')
            return
          } else if (this.listData.filter(item => item.taxPrice && !this.SETTINGS.reg_zero.test(item.taxPrice)).length > 0) {
            this.$message.warning('含税单价未正确填写')
            return
          }
          this.listData.forEach(ele => {
            ele.outsourceDeliveryTime = ele.outsourceDeliveryTime ? moment(ele.outsourceDeliveryTime).format('YYYY-MM-DD') : ''
          })
          this.formData.detailList = this.listData
          addOrUpdate({ ...this.formData, endFlag: '0' }).then(res => {
            this.$message({
              message: res.msg,
              type: 'success'
            })
            this.$layer.close(this.layerid) // 关闭弹框
            this.$parent.refresh() // 调用父组件的刷新方法
          })
        }
      })
    },
    cancel() {
      this.$layer.close(this.layerid)// 关闭弹框
    },
    // 选择订单明细的回调
    showMaterial(data) {
      data.forEach(ele => {
        delete ele.remark
      })
      this.listData.push(...data)
    }
  }
}
</script>

<style lang="less" scoped>
.table_container {
  padding-bottom: 20px !important;
  padding-top: 0px !important;
}
/deep/ .el-table__fixed-footer-wrapper {
.el-table__cell:last-of-type {
  height: 39px !important;
}
}
	/* .el-table {
  overflow-x: auto;
	}
	.el-table__header-wrapper,
	.el-table__body-wrapper,
	.el-table__footer-wrapper {
	overflow: visible;
	}
	.el-table::after {
	position: relative;
	}
	.el-table--scrollable-x .el-table__body-wrapper {
	overflow: visible;
	} */

</style>
